<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /*  var s=new Set();
          var arr=[10,20,30,30,40,50];
          arr.forEach(x=>s.add(x)) */

        //  console.log(s);

        var s = new Set([10, 20, 30]);
        console.log(s);

        var arr = [10, 20, 10, 20, 30]

        var s = new Set(arr);
        console.log(...s);

        var mySet = new Set();
        mySet.add("5")
        mySet.add(5)
        console.log(mySet); // Set(2){'5', 5}


        const items = new Set([1, 2, 3, 4, 5, 5, 5, 5]);
        var num = items.size // 5\
        console.log(num);


       console.log([...new Set('ababbcd')].join('')) 
        // "abc"

    </script>
</body>

</html>